<script setup>
import { useRoute } from '@/router/index.js';
import { useMain } from '@/store/app.js';
import JCOverview from './components/JCOverview.vue';
import TGOverview from './components/TGOverview.vue';
const route = useRoute();
const { projectType } = useMain();
const type = ref(projectType);
if (route.query?.TGCode) type.value = 'TG';
if (route.query?.JCCode) type.value = 'JC';
const handleRadioChange = val => (type.value = val);
</script>

<template>
  <div class="app-container">
    <JCOverview v-if="type === 'JC'" @handleRadioChange="handleRadioChange" />
    <TGOverview v-else @handleRadioChange="handleRadioChange" />
  </div>
</template>

<style lang="scss" scoped></style>
